package com.fenghuajueli.lib_data.entity.db;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Unique;

@Entity
public class NoteDbEntity implements Parcelable {
    @Id(autoincrement = false)
    private long create_time;
    private long record_time;
    private String msg;
    private int mood_res;
    private int weather_res;
    @Property
    private boolean is_hide;

    @Generated(hash = 1151336777)
    public NoteDbEntity(long create_time, long record_time, String msg,
                        int mood_res, int weather_res, boolean is_hide) {
        this.create_time = create_time;
        this.record_time = record_time;
        this.msg = msg;
        this.mood_res = mood_res;
        this.weather_res = weather_res;
        this.is_hide = is_hide;
    }

    @Generated(hash = 1708614972)
    public NoteDbEntity() {
    }

    protected NoteDbEntity(Parcel in) {
        create_time = in.readLong();
        record_time = in.readLong();
        msg = in.readString();
        mood_res = in.readInt();
        weather_res = in.readInt();
        is_hide = in.readByte() != 0;
    }

    public static final Creator<NoteDbEntity> CREATOR = new Creator<NoteDbEntity>() {
        @Override
        public NoteDbEntity createFromParcel(Parcel in) {
            return new NoteDbEntity(in);
        }

        @Override
        public NoteDbEntity[] newArray(int size) {
            return new NoteDbEntity[size];
        }
    };

    public long getCreate_time() {
        return this.create_time;
    }

    public void setCreate_time(long create_time) {
        this.create_time = create_time;
    }

    public long getRecord_time() {
        return this.record_time;
    }

    public void setRecord_time(long record_time) {
        this.record_time = record_time;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getMood_res() {
        return this.mood_res;
    }

    public void setMood_res(int mood_res) {
        this.mood_res = mood_res;
    }

    public int getWeather_res() {
        return this.weather_res;
    }

    public void setWeather_res(int weather_res) {
        this.weather_res = weather_res;
    }

    public boolean getIs_hide() {
        return this.is_hide;
    }

    public void setIs_hide(boolean is_hide) {
        this.is_hide = is_hide;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(create_time);
        dest.writeLong(record_time);
        dest.writeString(msg);
        dest.writeInt(mood_res);
        dest.writeInt(weather_res);
        dest.writeByte((byte) (is_hide ? 1 : 0));
    }
}
